import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_address",{schema:"nest-mall" } )
@Index("user_id",["userId",])
export class MallAddress {

    @PrimaryGeneratedColumn({
        type:"mediumint", 
        name:"id"
        })
    id:number;
        

    @Column("mediumint",{ 
        nullable:true,
        default: () => "'0'",
        name:"user_id"
        })
    userId:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"user_name"
        })
    userName:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:60,
        name:"tel_number"
        })
    telNumber:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"postal_Code"
        })
    postalCode:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        default: () => "'0'",
        name:"national_Code"
        })
    nationalCode:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        default: () => "'0'",
        name:"province_Name"
        })
    provinceName:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        default: () => "'0'",
        name:"city_Name"
        })
    cityName:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        default: () => "'0'",
        name:"county_Name"
        })
    countyName:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:120,
        name:"detail_Info"
        })
    detailInfo:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"is_default"
        })
    isDefault:number | null;
        
}
